apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  {{- if not .Values.skipLabels }}
  labels:
    {{- include "gadget.labels" . | nindent 4 }}
  {{- end }}
  name: {{ include "gadget.fullname" . }}-role-binding
  namespace: {{ include "gadget.namespace" . }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: {{ include "gadget.fullname" . }}-role
subjects:
  - kind: ServiceAccount
    name: {{ include "gadget.fullname" . }}
